package cn.stylefeng.guns.sys.modular.vote.mapper;

import cn.stylefeng.guns.sys.modular.projectPublicity.entity.MainInfo;
import cn.stylefeng.guns.sys.modular.projectPublicity.model.params.MainInfoParam;
import cn.stylefeng.guns.sys.modular.projectPublicity.model.result.MainInfoResult;
import cn.stylefeng.guns.sys.modular.vote.entity.VoteInfo;
import cn.stylefeng.guns.sys.modular.vote.model.params.VoteInfoParam;
import cn.stylefeng.guns.sys.modular.vote.model.result.VoteInfoResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 公示表 Mapper 接口
 * </p>
 *
 * @author WangZhen
 * @since 2021-01-28
 */
public interface VoteInfoMapper extends BaseMapper<VoteInfo> {

    /**
     * 获取列表
     *
     * @author WangZhen
     * @Date 2021-01-28
     */
    List<VoteInfoResult> customList(@Param("paramCondition") VoteInfoParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author WangZhen
     * @Date 2021-01-28
     */
    Page<VoteInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") VoteInfoParam paramCondition);


    /**
     * 发起投票
     *
     * @param param
     */
    void startVote(Map<String, Object> param);

    /**
     * 展示投票详情
     *
     * @param paramCondition
     * @return
     */
    Map<String, Object> showVoteInfo(@Param("paramCondition") Integer paramCondition);


}
